package com.qiantu.api.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

public class MemberBean implements Serializable{

    private String houseSerialNo;
    private String userSerialNo;
    private String userPhone;
    private String userNickName;
    private String memberNickName;
    private int roleType;
    private int userState;
    private String roleName;
    private List<MemberPermission> permissions;

//    protected MemberBean(Parcel in) {
//        houseSerialNo = in.readString();
//        userSerialNo = in.readString();
//        userPhone = in.readString();
//        userNickName = in.readString();
//        memberNickName = in.readString();
//        roleType = in.readInt();
//        userState = in.readInt();
//        roleName = in.readString();
//        in.readList(permissions,MemberPermission.class.getClassLoader());
//    }
//
//    public static final Creator<MemberBean> CREATOR = new Creator<MemberBean>() {
//        @Override
//        public MemberBean createFromParcel(Parcel in) {
//            return new MemberBean(in);
//        }
//
//        @Override
//        public MemberBean[] newArray(int size) {
//            return new MemberBean[size];
//        }
//    };

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public String getUserSerialNo() {
        return userSerialNo;
    }

    public void setUserSerialNo(String userSerialNo) {
        this.userSerialNo = userSerialNo;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }

    public String getMemberNickName() {
        return memberNickName;
    }

    public void setMemberNickName(String memberNickName) {
        this.memberNickName = memberNickName;
    }

    public int getRoleType() {
        return roleType;
    }

    public void setRoleType(int roleType) {
        this.roleType = roleType;
    }

    public int getUserState() {
        return userState;
    }

    public void setUserState(int userState) {
        this.userState = userState;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public List<MemberPermission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<MemberPermission> permissions) {
        this.permissions = permissions;
    }

//    @Override
//    public int describeContents() {
//        return 0;
//    }
//
//    @Override
//    public void writeToParcel(Parcel parcel, int i) {
//        parcel.writeString(houseSerialNo);
//        parcel.writeString(userSerialNo);
//        parcel.writeString(userPhone);
//        parcel.writeString(userNickName);
//        parcel.writeString(memberNickName);
//        parcel.writeInt(roleType);
//        parcel.writeInt(userState);
//        parcel.writeString(roleName);
//        parcel.writeList(permissions);
//    }

    public static class MemberPermission implements Serializable{
        private int typeId;
        private String targetContent;

//        protected MemberPermission(Parcel in) {
//            typeId = in.readInt();
//            targetContent = in.readString();
//        }
//
//        public static final Creator<MemberPermission> CREATOR = new Creator<MemberPermission>() {
//            @Override
//            public MemberPermission createFromParcel(Parcel in) {
//                return new MemberPermission(in);
//            }
//
//            @Override
//            public MemberPermission[] newArray(int size) {
//                return new MemberPermission[size];
//            }
//        };

        public int getTypeId() {
            return typeId;
        }

        public void setTypeId(int typeId) {
            this.typeId = typeId;
        }

        public String getTargetContent() {
            return targetContent;
        }

        public void setTargetContent(String targetContent) {
            this.targetContent = targetContent;
        }

//        @Override
//        public int describeContents() {
//            return 0;
//        }
//
//        @Override
//        public void writeToParcel(Parcel parcel, int i) {
//            parcel.writeInt(typeId);
//            parcel.writeString(targetContent);
//        }
    }
}
